﻿<%@ Control Language="C#" AutoEventWireup="true" CodeBehind="Header.ascx.cs" Inherits="OgrIsleri.DashBoard.Includes.Header" %>
<div class="topNav">
        <div class="wrapper">
            <div class="welcome"><a href="#" title=""><img src="<%=ResolveUrl("~/images")%>/userPic.png" alt="" /></a><span>Hoşgeldin, <%=Business.Tools.AdSoyad(Membership.GetUser()) %></span></div>
            <div class="userNav">
                <ul>
                    <li><a href="/DashBoard/" title=""><img src="<%=ResolveUrl("~/images")%>/icons/light/home.png" alt="" /><span>Anasayfa</span></a></li>
                    <li><a href="<%=ResolveUrl("~/DashBoard/Modul/Ogrenciler/Profil.aspx?Goster="+Membership.GetUser().ProviderUserKey)%>" title=""><img src="<%=ResolveUrl("~/images")%>/icons/topnav/profile.png" alt="" /><span>Profilim</span></a></li>
                    <li><a href="<%=ResolveUrl("~/DashBoard/Modul/Duyurular/TumListe.aspx")%>" title=""><img src="<%=ResolveUrl("~/images")%>/icons/topnav/messages.png" alt="" /><span>Duyurular</span></a></li>
                    <li class="dd1"><a title=""><img src="<%=ResolveUrl("~/images")%>/icons/topnav/tasks.png" alt="" /><span>Bilgilerim</span></a>
                        <ul class="userDropdown1">
                            <li><a href="/DashBoard/Modul/Birimler/Liste.aspx" title="Birim listele ve tanımla" class ="sTanim">Ders Programım</a></li>
                            <li><a href="/DashBoard/Modul/Bolumler/Liste.aspx" title="Bölüm listele ve tanımla" class ="sTanim">Notlarım</a></li>
                        </ul>
                    </li>
                    <li class="dd"><a title=""><img src="<%=ResolveUrl("~/images")%>/icons/topnav/messages.png" alt="" /><span>Mesajlarım</span><span style="display:none" class="numberTop"></span></a>
                        <ul class="userDropdown">
                            <li><a href="/DashBoard/Modul/Mesajlar/MesajYaz.aspx" title="" class="sAdd">Yeni Mesaj</a></li>
                            <li><a href="/DashBoard/Modul/Mesajlar/Mesajlar.aspx" title="" class="sInbox">Gelen Kutum</a></li>
                        </ul>
                    </li>
                    <li><a href="<%=ResolveUrl("~/DashBoard/") %>Default.aspx?SignOut=ok" title=""><img src="<%=ResolveUrl("~/images")%>/icons/topnav/logout.png" alt="" /><span>Çıkış</span></a></li>
                </ul>
            </div>
            <div class="clear"></div>
        </div>
    </div>

<script type="text/javascript">
    function Zamanlamana() {
        setTimeout(function () { MesajSayisi() }, 10000);
    }
        MesajSayisi();

        function MesajSayisi() {
            $.ajax({
                url: "/DashBoard/Ajax/Ajax.aspx?Islem=MesajSayisi",
                data: '{}',
                dataType: "json",
                type: "POST",
                contentType: "application/json; charset=utf-8",
                success: function (msg) {
                    if (msg != "0") {
                        $(".numberTop").show();
                        $(".numberTop").empty();
                        $(".numberTop").append(msg);
                    }
                    else {
                        $(".numberTop").hide();
                    }
                }
            });
            Zamanlamana();
        }

</script>